Skip to content

Recursively looks for urls for a given url from same host#8

Closed
gobelinus wants to merge 1 commit intopeterbe:masterfrom
gobelinus:master
Closed

Recursively looks for urls for a given url from same host#8
gobelinus wants to merge 1 commit intopeterbe:masterfrom
gobelinus:master

Conversation

@gobelinus
Copy link

Given a url, tries to find urls from a['href'] and parses them if links are from same host, basically to handle use case when same css file is used across multiple pages and instead of passing multiple urls, single url will do.

Also ignores, urls like 'javascript:', 'mailto:'.

Ignores query string and fragments from url while comparing urls.

@peterbe
Copy link
Owner

peterbe commented Jan 28, 2013

Thanks. That's a good start but I think it needs some thought.

You can already supply multiple URLs but you do it from the outside. I.e. you can write a script that does the spidering and then calling mincss from there. Would you consider making it some sort of plugin? Perhaps a repo called recursive-mincss.

@gobelinus
Copy link
Author

you can write a script that does the spidering and then calling mincss from there.

That was the purpose of writing recursive thing to avoid usage of external script. It can always be converted to a plugin but any outside script/plugin will result in duplication specially wrt fetching urls, and parsing html.

Alternatively, I think we can have a new param which can determine recursive nature.

e.g.

if self.recursive \
     and url not in self.url_queue:
         self.url_queue.append(url)

@peterbe
Copy link
Owner

peterbe commented Jan 3, 2018

Too old now.

@peterbe peterbe closed this Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants